package com.jackson.spring.beandemo.factorybean;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author jackson
 *
 */
public class CarFactoryBean implements FactoryBean<Car> {

	private Car car;
	
	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	// 返回bean的对象
	public Car getObject() throws Exception {
		return car;
	}

	//返回bean的类型
	public Class<?> getObjectType() {
		return Car.class;
	}

	//是否是单实例的
	public boolean isSingleton() {
		return true;
	}

}
